package perso.marcr.lst.service;

import java.io.IOException;
import java.util.List;


public interface JobService {

	/**
	 * The job name regexp.
	 * That tell what chars are allowed in the job name.
	 */
	public static final String JOB_NAME_REGEXPR = "^[a-zA-Z0-9]+$";


	/**
	 * @param jobName
	 * @return true if the job already exists, else false.
	 */
	boolean jobExists(String jobName);

	/**
	 * @param jobName
	 * @return true if the job is well formed, else false.
	 */
	boolean jobNameWellFormed(String jobName);

	/**
	 * @return a list of all jobs who have a jobname well formed.
	 */
	List<String> getAllJobs();

	/**
	 * @param jobName
	 */
	void create(String jobName);


	/**
	 * @param jobName
	 * @throws IOException
	 */
	void delete(String jobName) throws IOException;	

	/**
	 * @param oldJobName
	 * @param newJobName
	 * @throws IOException 
	 */
	void renameJob(String oldJobName, String newJobName) throws IOException;
}
